//
//  GetKeywordDataRequest.m
//  Grammar
//
//  Created by Rick on 7/11/13.
//
//

#import "GetKeywordDataRequest.h"
#import "Keyword.h"
#import "KeywordManager.h"

@implementation GetKeywordDataRequest

- (NSString*)getRequestUrl
{
    return [NSString stringWithFormat:@"%@%@",REQUEST_DOMAIN,@"keyword/getAllKeywords.intf?"];
}

- (ITTRequestMethod)getRequestMethod
{
    return ITTRequestMethodGet;
}

- (void)processResult
{
    
    for (NSDictionary *keywordDic in [self.resultDic objectForKey:@"keywords"]) {
        Keyword *aKeyword = [[Keyword alloc] initWithDataDic:keywordDic];
        [[KeywordManager sharedManager] updateKeyword:aKeyword];
        [aKeyword release];
    }
    
}
@end
